import {delay} from "plain-utils/utils/delay";
import {shuffle} from "plain-utils/object/shuffle";

const PlainUtils = {
    delay,
    shuffle,
}

const MockData = {
    data: async () => (await import('../../../src/doc/data/data.json')).default as any as string[],
    data1: async () => (await import('../../../src/doc/data/data-1.json')).default as any as string[],
    data2: async () => (await import('../../../src/doc/data/data-2.json')).default as any as string[],
    treeData: async () => (await import('../../../src/doc/data/tree.data.json')).default as any as string[],
    address: async () => (await import('../../../src/doc/data/address.json')).default as any as string[],
}

export const win = {PlainUtils, MockData}

export const Win = window as any as Window & typeof win

export const initWin = () => {
    Object.assign(window, win)
}